import 'dart:convert';

class TestResult {
  ///测试人员
  final String tester;
  final String mac;

  ///测试时间
  final int testingTime;

  ///测试通过
  final bool isOk;

  TestResult(
      {required this.tester,
      required this.mac,
      required this.testingTime,
      required this.isOk});

  Map toMap() {
    var map = {
      "tester": tester,
      "mac": mac,
      "testingTime": testingTime,
      "isOk": isOk
    };
    return map;
  }

  String toJson() {
    return JsonEncoder().convert(this);
  }
}
